package com.net.io.nio.three.component.channel.blockorno;

import java.io.IOException;
import java.net.Socket;

/**
 * @author zhangtengfei
 * @date 2022/1/28 15:02
 */
public class Client {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("localhost", 8080);
        //向服务端发送数据
        socket.getOutputStream().write("HelloServer".getBytes());
        socket.getOutputStream().flush();
        System.out.println("向服务端发送数据结束");
        socket.close();
    }
}
